(G_PARAM_SPEC_VALUE_TYPE (prop->pspec) != G_TYPE_FILE))
{
GObject *object = g_hash_table_lookup (priv->objects,
- prop->text->str);
+ g_strstrip (prop->text->str));
if (object)
{
* be set once.
*/
if (info->constructor ||
- (info->parent && ((ChildInfo*)info->parent)->internal_child != NULL))
+ (info->parent &&
+ info->parent->tag_type == TAG_CHILD &&
+ ((ChildInfo*)info->parent)->internal_child != NULL))
param_filter_flags = G_PARAM_CONSTRUCT_ONLY;
else
param_filter_flags = G_PARAM_CONSTRUCT | G_PARAM_CONSTRUCT_ONLY;
if (construct_parameters->len)
g_warning ("Can't pass in construct-only parameters to %s", info->id);
}
- else if (info->parent && ((ChildInfo*)info->parent)->internal_child != NULL)
+ else if (info->parent &&
+ info->parent->tag_type == TAG_CHILD &&
+ ((ChildInfo*)info->parent)->internal_child != NULL)
{
gchar *childname = ((ChildInfo*)info->parent)->internal_child;
obj = gtk_builder_get_internal_child (builder, info, childname, error);
static void free_property_info (PropertyInfo *info);
static void free_object_info (ObjectInfo *info);
-enum {
- TAG_PROPERTY,
- TAG_MENU,
- TAG_REQUIRES,
- TAG_OBJECT,
- TAG_CHILD,
- TAG_SIGNAL,
- TAG_INTERFACE,
- TAG_TEMPLATE,
-};
static inline void
state_push (ParserData *data, gpointer info)
{
ObjectInfo *object_info = state_pop_info (data, ObjectInfo);
ChildInfo* child_info = state_peek_info (data, ChildInfo);
+ PropertyInfo* prop_info = state_peek_info (data, PropertyInfo);
+
+ if (child_info && child_info->tag_type != TAG_CHILD)
+ child_info = NULL;
+ if (prop_info && prop_info->tag_type != TAG_PROPERTY)
+ prop_info = NULL;
if (data->requested_objects && data->inside_requested_object &&
(data->cur_object_level == data->requested_object_level))
}
if (child_info)
child_info->object = object_info->object;
+ if (prop_info)
+ g_string_assign (prop_info->text, object_info->id);
if (GTK_IS_BUILDABLE (object_info->object) &&
GTK_BUILDABLE_GET_IFACE (object_info->object)->parser_finished)